home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 27 / CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso / CUCD / PowerPC / vbcc / machines / amigawos / libsrc / userlibs / MakeCGFX.script < prev    next >
AmigaDOS Script File  |  1998-08-02  |  2KB  |  96 lines

  1. .key -sd/S
  2.  
  3. if not exists MakeCGFX.script
  4.   echo "Please change first to the script's directory!"
  5.   quit
  6. endif
  7.  
  8. if not exists FD:cybergraphics_lib.fd
  9.   echo "Can't find cybergraphics_lib.fd !"
  10.   quit
  11. endif
  12.  
  13. if "<-sd>" EQ ""
  14.   set lbmodel large data
  15.   set alibnam cgfx.lib
  16.   set fdflags ""
  17.   set vcflags "+warpos -amiga-align"
  18. else
  19.   set lbmodel small data
  20.   set alibnam cgfxs.lib
  21.   set fdflags " -sd"
  22.   set vcflags "+warpos -amiga-align -sd"
  23. endif
  24.  
  25. echo "Checking for required commands. Stopping if missing.*N"
  26.  
  27. failat 5
  28.   echo noline "which    : "
  29.     which which            ;stop if missing. :-)
  30.   echo noline "copy     : "
  31.     which copy
  32.   echo noline "delete   : "
  33.     which delete
  34.   echo noline "execute  : "
  35.     which execute
  36.   echo noline "join     : "
  37.     which join
  38.   echo noline "list     : "
  39.     which list
  40.   echo noline "fd2libWOS: "
  41.     which fd2libWOS
  42.   echo noline "vc       : "
  43.     which vc
  44. failat 20
  45.  
  46. echo "*NCompiling $alibnam with $lbmodel model. This may take some time..."
  47.  
  48. echo "*NCleaning T:..."
  49.   delete t:($alibnam|#?.(s|o|dir)) quiet >nil:
  50.  
  51.   fd2libWOS $fdflags -of "Creating %s..." -o t: FD:cybergraphics_lib.fd
  52.  
  53. echo "*NAssembling stubs..."
  54.   vc $vcflags -c t:#?.s
  55.  
  56. echo "*NRemoving obsolete assembler sources..."
  57.   delete t:#?.s t:#?.asm quiet
  58.  
  59. echo "*NCompiling/Assembling support routines..."
  60.   vc $vcflags -c #?.(c|s)
  61.  
  62. echo "*NJoining everything together..."
  63.   join #?.o t:#?.o to t:$alibnam
  64.  
  65. echo "*NCleaning up..."
  66.   delete #?.o t:#?.o quiet
  67.  
  68. unset vcflags
  69. unset fdflags
  70. unset lbmodel
  71.  
  72. set instto T:
  73.  
  74. which >nil: ask
  75. if not warn
  76.   ask "*NInstall $alibnam to vlibwos: (y/n)?"
  77.   if warn
  78.     set instto vlibwos:
  79.     failat 21
  80.     copy >nil: t:$alibnam $instto
  81.     if not fail
  82.       delete t:$alibnam quiet
  83.     endif
  84.     failat 20
  85.   endif
  86. endif
  87.  
  88. if exists ${instto}${alibnam}
  89.   echo "*N*N...poooh... $alibnam can be found in ${instto}."
  90. else
  91.   echo "*N*NInstallation error!"
  92. endif
  93.  
  94. unset instto
  95. unset alibnam
  96.